<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="root">
        <body-content>
            <!--具名插槽-->
            <div slot="header">header</div>
            <div slot="footer">footer</div>
        </body-content>
    </div>
    <script>
        Vue.component('body-content', {
            template: `<div>
                            <slot name="header"></slot>
                            <div class="content">conetent</div>
                            <slot name="footer"></slot>
                       </div>`
        })
        let vm = new Vue({
            el:"#root",
            data: {

            }
        })
    </script>
</body>
</html>
